package com.aipartner.mapper;

import com.aipartner.entity.CreditsPackage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 积分套餐 Mapper 接口
 *
 * @author AI Partner
 * @since 2025-09-18
 */
@Mapper
public interface CreditsPackageMapper extends BaseMapper<CreditsPackage> {

    /**
     * 获取所有可用的积分套餐
     */
    @Select("SELECT * FROM credits_packages WHERE status = 1 ORDER BY sort_order ASC, id ASC")
    List<CreditsPackage> selectAvailablePackages();
}
